package com.sky.dto;

import com.sky.pojo.Employee;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.io.Serializable;

@Data
@ApiModel
public class EmployeeDTO implements Serializable, Cloneable {

    @ApiModelProperty("id属性")
    private Long id;

    @ApiModelProperty("用户名")
    private String username;

    @ApiModelProperty("姓名")
    private String name;

    private String phone;

    private String sex;

    private String idNumber;

    @Override
    public Employee clone() throws CloneNotSupportedException {
        Employee employee = new Employee();
        BeanUtils.copyProperties(this, employee);
       // employee.setUpdateTime(LocalDateTime.now());

        return employee;
    }
}
